package edu.online.dal;

import edu.online.entity.LessonTimeEntityKey;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;

public interface LessonTimeEntityMapper {
    @Delete({
        "delete from lessontime",
        "where TimeItemID = #{timeitemid,jdbcType=CHAR}",
          "and LessonID = #{lessonid,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(LessonTimeEntityKey key);

    @Insert({
        "insert into lessontime (TimeItemID, LessonID)",
        "values (#{timeitemid,jdbcType=CHAR}, #{lessonid,jdbcType=CHAR})"
    })
    int insert(LessonTimeEntityKey record);

    @InsertProvider(type=LessonTimeEntitySqlProvider.class, method="insertSelective")
    int insertSelective(LessonTimeEntityKey record);
}